package com.spring.component;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class DemoD {
//    @Resource
    @Autowired
    @Qualifier(value = "demoA")
    private DemoC dc;
    public void print(){
        dc.print();
    }
}
